<?php if (count($this->timelines)): ?>
<table id="myTable" class="table table-bordered tablesorter" >
    <thead> 
            <tr style="cursor: pointer;">
                <th><?php echo $this->translate('Название лекции')?></th>
                <th><?php echo $this->translate('Курс')?></th> 
                <th><?php echo $this->translate('Моя оценка')?></th>  
                <th><?php echo $this->translate('Дата')?></th>  
            </tr>   
    </thead>
    <tbody>
    <?php foreach ($this->timelines as $item):?>
    <tr>
        <td width="25%"><a href="/lectures/single/id/<?php echo $item['lecture_id'] ?>">
            <h4><?php echo $this->escape($item['title']) ?></h4></a></td>
        <td width="25%"><h5 class="nobold"><?php 
            echo $this->escape($item['course_name']) ?>
            </h5></a></td>
        <td>
            <?php if($item['rank']) 
                echo $item['rank'];
                else echo $this->translate('Оценки нет'); 
            ?>
        </td>
        <td>
            <?php echo $item['date'];  ?>
        </td>
    </tr>
<?php
    endforeach; ?>
    </tbody>
    </table>

<div id="pager" class="pager" style="padding-top: 5px; height: 28px;"> 
    <form> 
        <img src="/www/images/table/first.png" class="first"> 
        <img src="/www/images/table/prev.png" class="prev"> 
        <input type="text" class="pagedisplay" style="width: 60px;"> 
        <img src="/www/images/table/next.png" class="next"> 
        <img src="/www/images/table/last.png" class="last"> 
        <?php echo $this->translate('кол-во лекций на страницу:')?>
        <select class="pagesize" style="width: 60px;"> 
            <option value="5">5</option> 
            <option selected="selected" value="20">10</option> 
            <option value="20">20</option> 
            <option value="30">30</option> 
            <option value="40">40</option> 
        </select> 
    </form> 
</div>

<?php else:
?>
    <p><?php echo $this->translate('Вы еще не просматривали лекции.')?></p>
<?php endif ?>

<script type="text/javascript">
    $(document).ready(function() 
        { 
            $("#myTable")
            .tablesorter() 
            .tablesorterPager({container: $("#pager")});
        } 
    ); 
</script>
